import { RouteRecordRaw } from 'vue-router';
const  category = ()=> import ('@/views/page/category.vue')


/**
 * 定义动态路由
 * 前端添加路由，请在顶级节点的 `children 数组` 里添加
 * @description 各字段请查看 `/@/views/system/menu/component/addMenu.vue 下的 ruleForm`
 * @returns 返回路由菜单数据
 */
export const dynamicRoutes: Array<RouteRecordRaw> = [
    {
        path: '/',
        component: () => import('@/views/index.vue') ,// 建议进行路由懒加载，优化访问性能
        children:[
            {
                path: 'blog',
                name: 'blog',
                component: () => import('@/views/page/blog.vue'),
                meta: {
                    title: '文章',
                    isKeepAlive: true,
                    icon: 'HighlightOutlined',
                    color: '#01B7EECC',
                },
                children:[
                    {
                        path: '',
                        name:'',
                        component:category
                    },
                    {
                        path: 'vue',
                        name: 'vue',
                        component:category
                    },
                    {
                        path: 'javascript',
                        name: 'javascript',
                        component:category
                    },
                    {
                        path: 'html',
                        name: 'html',
                        component:category
                    },
                    {
                        path: 'docker',
                        name: 'docker',
                        component:category
                    },
                    {
                        path: 'git',
                        name: 'git',
                        component:category
                    },
                    {
                        path: 'idea',
                        name: 'idea',
                        component:category
                    },
                ]
            },
            {
                path: 'demo',
                name: 'demo',
                component: () => import('@/views/page/demo.vue'),
                meta: {
                    title: '案例',
                    isKeepAlive: true,
                    icon: 'BgColorsOutlined',
                    color: '#777bce',
                },
            },
            {
                path: 'about',
                name: 'About',
                component: () => import('@/views/page/about.vue'),
                meta: {
                    title: '关于',
                    isKeepAlive: true,
                    icon: 'UserOutlined',
                    color: '#f60',
                },
            } ,
            {
                path: 'board',
                name: 'Board',
                component: () => import('@/views/page/board.vue'),
                meta: {
                    title: '留言',
                    isKeepAlive: true,
                    icon: 'MessageOutlined',
                    color: '#d243ff',
                },
            },
            {
                path: '/blog/article',
                name: 'article',
                component: () => import('@/views/page/article.vue')
            },
        ]
    },


]

